Copy the files SENDKEY.DCU and SENDKEY.DCR to a library directory of your choice.
Choose from within the Delphi menu bar Options, Install components, Add and select the SENDKEY.DCU file. Click OK and OK.
The component is now installed in the Sample panel.
Use of the SENDKEY component
TSendkey makes it simple to send Keystrokes to another application. The two functions and the UseDll property are explained below. I have tried a lot of third party units and finally ended up making my own, at least this one works. The nice thing with this component is that you can use a Dll to send multiple Keystrokes ( up to 255 characters ) or use the component without the Dll to send a small number to another application ( tested for up to 12 characters ).
Properties
UseDll False will use the VCL without the Dll to send keystrokes
True will load the Dll at runtime
( must be in your application path or //Systems/ dir )
Functions
SendKeys (S : String): integer;
This will send keystrokes to the top level application